/* iOS Dynamic Island 通知系统样式 */

.dynamic-island-container {
  position: relative;
  border-radius: 20px;
  cursor: pointer;
  transition: width 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              height 0.4s cubic-bezier(0.32, 0.72, 0, 1),
              border-radius 0.4s cubic-bezier(0.32, 0.72, 0, 1),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.3s ease;
  user-select: none;
  z-index: 1000;
  height: 36px;
  min-width: 200px;
  width: fit-content;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.85);
  border: none;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  will-change: width, height, border-radius, box-shadow, background;
  /* 只使用transition，移除冲突的animation */
  transition: width 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              height 0.4s cubic-bezier(0.32, 0.72, 0, 1),
              border-radius 0.4s cubic-bezier(0.32, 0.72, 0, 1),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              background 0.3s ease;
}

/* 动画容器 - 专门处理视觉效果，不影响布局 */
.dynamic-island-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  /* 默认呼吸动画 */
  animation: breathingPulse 4s ease-in-out infinite;
}

/* 进度更新时的闪烁效果 */
.dynamic-island-container.progress-updating::before {
  animation:
    breathingPulse 4s ease-in-out infinite,
    progressFlash 0.5s ease-in-out;
}

/* 新通知入场动画 */
.dynamic-island-container.new-notification::before {
  animation:
    newNotificationBounce 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    breathingPulse 4s ease-in-out infinite 0.6s;
}

/* 过渡阶段动画 */
.dynamic-island-container.transitioning {
  animation: transitionFromAntNotification 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 过渡阶段的特殊效果 */
.dynamic-island-container.transitioning::before {
  animation: none; /* 暂停呼吸动画 */
}

/* 防止状态更新时的位置跳跃 */
.dynamic-island-container:not(.new-notification) {
  /* 确保非新通知状态下不会有位置变化 */
  position: relative;
}

/* 滚轮交互提示 - 使用独立的伪元素避免冲突 */
.dynamic-island-container:hover .compact-content-wrapper::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  opacity: 0;
  animation: scrollHint 2s infinite;
  z-index: 10;
}

@keyframes scrollHint {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* 呼吸动画 - 使用opacity和filter避免transform冲突 */
@keyframes breathingPulse {
  0%, 100% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.95;
    filter: brightness(1.05);
  }
}

/* 进度更新闪烁动画 - 使用filter避免background冲突 */
@keyframes progressFlash {
  0% {
    opacity: 1;
    filter: brightness(1) hue-rotate(0deg);
  }
  50% {
    opacity: 0.9;
    filter: brightness(1.2) hue-rotate(200deg);
  }
  100% {
    opacity: 1;
    filter: brightness(1) hue-rotate(0deg);
  }
}

/* 新通知入场动画 - 避免位置变化，只使用视觉效果 */
@keyframes newNotificationBounce {
  0% {
    opacity: 0.7;
    filter: blur(1px) brightness(0.9);
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    opacity: 1;
    filter: blur(0px) brightness(1.05);
    box-shadow:
      0 6px 20px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  100% {
    opacity: 1;
    filter: blur(0px) brightness(1);
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

/* 从通知区域滑入的动画 - 两阶段过渡 */
@keyframes slideInFromNotification {
  0% {
    opacity: 0;
    transform: translateX(320px) translateY(-60px) scale(0.9);
    filter: blur(2px);
  }
  30% {
    opacity: 0.6;
    transform: translateX(100px) translateY(-30px) scale(0.95);
    filter: blur(1px);
  }
  70% {
    opacity: 0.9;
    transform: translateX(-20px) translateY(-5px) scale(1.02);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
    filter: blur(0px);
  }
}

/* 过渡阶段的动画 */
@keyframes transitionFromAntNotification {
  0% {
    opacity: 0;
    transform: translateX(280px) translateY(-50px) scale(0.8);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
  }
  20% {
    opacity: 0.4;
    transform: translateX(200px) translateY(-35px) scale(0.85);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
  }
  50% {
    opacity: 0.7;
    transform: translateX(80px) translateY(-15px) scale(0.92);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(16px);
  }
  80% {
    opacity: 0.9;
    transform: translateX(-10px) translateY(-2px) scale(0.98);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(18px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
  }
}

/* 非悬停状态 - 确保默认状态明确定义 */
.dynamic-island-container:not(:hover):not(.force-expanded):not(.leaving) {
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(1);
  animation-play-state: running;
}

/* 离开状态 - 平滑过渡回默认状态 */
.dynamic-island-container.leaving {
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: scale(1);
  animation-play-state: running;
  /* 确保transition优先级高于animation */
  transition: box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Hover 效果 - 使用transition避免动画冲突 */
.dynamic-island-container:hover:not(.leaving),
.dynamic-island-container.force-expanded:not(.leaving) {
  /* 胶囊本身不变形，只是展开面板 */
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  /* 暂停呼吸动画，使用静态的轻微放大 */
  animation-play-state: paused;
  transform: scale(1.01);
}

/* 收起状态 - 胶囊形状 */
.dynamic-island-compact {
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  width: 100%;
  opacity: 1;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  font-size: 13px;
  color: #ffffff;
  box-sizing: border-box;
}

/* 悬停时保持收缩状态可见 */
.dynamic-island-container:hover .dynamic-island-compact,
.dynamic-island-container.force-expanded .dynamic-island-compact {
  opacity: 1;
  pointer-events: auto;
}

.dynamic-island-compact .compact-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.4s ease;
}

/* 轮播动画 - iOS风格平滑过渡 */
.dynamic-island-compact .compact-content {
  position: relative;
  transition: all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.dynamic-island-compact .compact-content.carousel-animating {
  opacity: 0;
  transform: translateY(-8px) scale(0.95);
}

/* 轮播内容容器 */
.compact-content-wrapper {
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
}

.compact-content-item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(0);
  width: calc(100% - 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 1;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.compact-content-item.entering {
  opacity: 0;
  transform: translate(-50%, -35%) translateZ(0);
  animation: fadeInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.compact-content-item.exiting {
  opacity: 1;
  transform: translate(-50%, -50%) translateZ(0);
  animation: fadeOutDown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.compact-content-item.active {
  opacity: 1;
  transform: translate(-50%, -50%) translateZ(0);
}

/* 状态切换时的平滑过渡 - 避免闪烁 */
.compact-content-item {
  transition: opacity 0.3s ease, color 0.3s ease;
}

.compact-title,
.compact-date {
  transition: color 0.3s ease, font-size 0.3s ease;
}

.status-indicator {
  /* 只负责状态切换的平滑过渡 */
  transition: background-color 0.3s ease;
  will-change: background-color;
  position: relative;
}

/* 状态指示器的动画效果层 */
.status-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
  /* 默认无动画 */
  opacity: 0;
}

/* 文字切换动画 */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -35%) translateZ(0);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translateZ(0);
  }
}

@keyframes fadeOutDown {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translateZ(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -65%) translateZ(0);
  }
}

.dynamic-island-compact .compact-title {
  flex: 1;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.98);
  white-space: nowrap;
  text-align: left;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dynamic-island-compact .compact-date {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

/* 收缩状态内容分组 */
.compact-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.compact-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dynamic-island-compact .notification-counter {
  font-size: 9px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0.8;
}

/* 系统时间专用样式 */
.system-time-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
}

.system-time-panel {
  text-align: center;
}

.system-time-main {
  font-size: 28px !important;
  font-weight: 300 !important;
  letter-spacing: -0.5px;
  color: #ffffff !important;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.system-time-detail {
  margin-top: 20px !important;
}

.time-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.time-detail-row:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.time-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.time-value {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* 状态指示器 - 彩色圆点（优化版） */
.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow:
    0 0 8px currentColor,
    0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.6);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 状态指示器动画伪元素基础样式 */
.status-indicator::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.status-indicator[data-status="running"] {
  background: #007AFF;
}

.status-indicator[data-status="running"]::after {
  opacity: 1;
  background: #007AFF;
  animation: statusPulse 2s ease-in-out infinite;
}

/* 运行状态脉冲动画 - 只影响::after伪元素 */
@keyframes statusPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
    box-shadow: 0 0 8px #007AFF;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.4;
    box-shadow: 0 0 16px #007AFF, 0 0 24px rgba(0, 122, 255, 0.3);
  }
}

.status-indicator[data-status="success"] {
  background: #34C759;
}

.status-indicator[data-status="success"]::after {
  opacity: 1;
  background: #34C759;
  animation: successPulse 1.5s ease-in-out infinite;
}

.status-indicator[data-status="error"],
.status-indicator[data-status="failed"] {
  background: #FF3B30;
}

.status-indicator[data-status="error"]::after,
.status-indicator[data-status="failed"]::after {
  opacity: 1;
  background: #FF3B30;
  animation: errorPulse 1s ease-in-out infinite;
}

.status-indicator[data-status="warning"] {
  background: #FF9500;
}

.status-indicator[data-status="warning"]::after {
  opacity: 1;
  background: #FF9500;
  animation: warningPulse 2s ease-in-out infinite;
}

/* 成功状态动画 */
@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px #34C759;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
    box-shadow: 0 0 16px #34C759, 0 0 24px rgba(52, 199, 89, 0.3);
  }
}

/* 错误状态动画 */
@keyframes errorPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px #FF3B30;
  }
  25% {
    transform: scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
    box-shadow: 0 0 16px #FF3B30, 0 0 24px rgba(255, 59, 48, 0.4);
  }
  75% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

/* 警告状态动画 */
@keyframes warningPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 8px #FF9500;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.75;
    box-shadow: 0 0 16px #FF9500, 0 0 24px rgba(255, 149, 0, 0.3);
  }
}

.status-indicator.paused {
  background: #8E8E93;
}

/* 状态指示器在展开状态下的样式 */
.dynamic-island-container:hover .status-indicator {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 8px currentColor;
}

/* 脉冲动画 */
@keyframes pulse-blue {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px #007AFF;
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
    box-shadow: 0 0 16px #007AFF;
  }
}

@keyframes pulse-red {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px #FF3B30;
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
    box-shadow: 0 0 16px #FF3B30;
  }
}

@keyframes pulse-orange {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px #FF9500;
  }
  50% {
    opacity: 0.8;
    transform: scale(1.2);
    box-shadow: 0 0 16px #FF9500;
  }
}

/* 展开状态 - 向下展开的面板 */
.dynamic-island-expanded {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.96);
  width: 340px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    padding 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    0 16px 40px rgba(0, 0, 0, 0.4),
    0 8px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  z-index: 999;
}

.dynamic-island-container:hover .dynamic-island-expanded,
.dynamic-island-container.force-expanded .dynamic-island-expanded {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
  max-height: 240px;
  min-height: 120px;
  padding: 24px 28px 24px 28px;
}

/* 添加小三角形指示器 */
.dynamic-island-expanded:before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid rgba(0, 0, 0, 0.85);
  filter: drop-shadow(0 -2px 6px rgba(0, 0, 0, 0.4));
}

/* 单个通知详情容器 - 优化版 */
.single-notification-detail {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  gap: 16px;
}

/* 导航提示样式 - 超级精简 */
.navigation-hint {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 6px;
  padding: 0;
  border: none;
  gap: 6px;
}

.nav-counter {
  font-size: 8px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
}

.nav-instruction {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
}

/* 自定义滚动条 */
.notifications-list::-webkit-scrollbar {
  width: 4px;
}

.notifications-list::-webkit-scrollbar-track {
  background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* 通知项样式 - 展开状态下的详细显示 */
.dynamic-island-item {
  background: transparent;
  border-radius: 0;
  padding: 0;
  flex-shrink: 0;
  margin-bottom: 0;
  border: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dynamic-island-item:last-child {
  margin-bottom: 0;
}

.dynamic-island-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.dynamic-island-item-title {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin-bottom: 2px;
}

/* 内联导航计数器 */
.nav-counter-inline {
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  margin-left: 8px;
  flex-shrink: 0;
}

/* 内联队列指示器 */
.queue-indicator-inline {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  font-style: italic;
}

.dynamic-island-item-description {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  margin-top: 6px;
  margin-bottom: 18px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.dynamic-island-item-progress {
  margin-top: 14px;
  width: 100%;
  box-sizing: border-box;
}

/* 进度条样式 - 优化版 */
.progress-bar {
  width: 100%;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-sizing: border-box;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  position: relative;
}

/* 进度条光泽效果 */
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
  border-radius: 6px 6px 0 0;
}

/* 当前项高亮样式 */
.dynamic-island-item.current-item {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.current-indicator {
  font-size: 10px;
  font-weight: 600;
  color: #007AFF;
  background: rgba(0, 122, 255, 0.2);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 8px;
}

/* 队列指示器样式 - 超级精简 */
.queue-indicator {
  padding: 0;
  background: transparent;
  border-radius: 0;
  margin-top: 4px;
  text-align: right;
  border: none;
}

.queue-indicator span {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
  font-style: italic;
}

/* 统一的iOS黑色样式 - 不匹配主题 */

/* 响应式设计 */
@media (max-width: 768px) {
  .dynamic-island-expanded {
    width: 300px;
    max-width: calc(100vw - 40px);
  }

  .dynamic-island-container {
    min-width: 180px;
    max-width: 360px;
  }

  .dynamic-island-compact .compact-title {
    max-width: 200px;
  }

  .system-time-title {
    font-size: 14px !important;
  }
}

@media (max-width: 480px) {
  .dynamic-island-expanded {
    width: 260px;
    max-width: calc(100vw - 20px);
    padding: 20px;
  }

  .dynamic-island-compact {
    padding: 0 12px;
  }

  .dynamic-island-container {
    height: 32px;
    min-width: 160px;
    max-width: 280px;
  }

  .dynamic-island-compact .compact-title {
    max-width: 140px;
    font-size: 13px;
  }

  .dynamic-island-compact .compact-date {
    font-size: 10px;
  }

  .dynamic-island-compact .notification-counter {
    font-size: 8px;
  }

  .system-time-title {
    font-size: 13px !important;
  }

  .system-time-main {
    font-size: 22px !important;
  }

  .dynamic-island-item-title {
    font-size: 16px;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .dynamic-island-container {
    border-width: 2px;
    background: rgba(0, 0, 0, 0.95);
  }
  
  .status-indicator {
    border: 1px solid currentColor;
  }
}

/* 防止状态切换闪烁的关键样式 */
.compact-content-item * {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* 减少动画模式支持 - 优化性能和可访问性 */
@media (prefers-reduced-motion: reduce) {
  .dynamic-island-container,
  .dynamic-island-container:hover,
  .dynamic-island-container.progress-updating,
  .dynamic-island-container.new-notification {
    animation: none !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
  }

  .status-indicator[data-status="running"],
  .status-indicator[data-status="success"],
  .status-indicator[data-status="error"],
  .status-indicator[data-status="failed"],
  .status-indicator[data-status="warning"] {
    animation: none !important;
  }

  .compact-content-item.entering,
  .compact-content-item.exiting {
    animation: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .dynamic-island-container:hover {
    transform: scale(1.01);
  }

  .dynamic-island-container:active {
    transform: scale(0.99);
  }
}

/* ============ Ant Design 通知过渡样式 ============ */

/* 标记为过渡中的ant-notification */
.ant-notification .notification-transitioning {
  position: relative;
  overflow: visible;
}

/* 过渡中的通知添加特殊效果 */
.ant-notification .notification-transitioning::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  animation: transitionHint 0.5s ease-in-out 2.5s forwards;
}

@keyframes transitionHint {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    transform: scale(1) translateX(50px);
  }
}

/* 过渡阶段的通知淡出效果 */
.ant-notification .notification-transitioning.ant-notification-fade-leave {
  animation: fadeToIsland 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes fadeToIsland {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  30% {
    opacity: 0.7;
    transform: translateX(-20px) scale(0.95);
  }
  70% {
    opacity: 0.3;
    transform: translateX(-100px) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translateX(-200px) scale(0.6);
  }
}

/* ============ 展开状态内容样式优化 ============ */

/* 展开状态的标题样式 */
.dynamic-island-item-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.98) !important;
  line-height: 1.4 !important;
  letter-spacing: -0.01em !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  margin-bottom: 2px !important;
}

/* 展开状态的描述样式 */
.dynamic-island-item-description {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: rgba(255, 255, 255, 0.8) !important;
  line-height: 1.5 !important;
  letter-spacing: -0.005em !important;
  margin-bottom: 8px !important;
}

/* 展开状态的头部布局 */
.dynamic-island-item-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 8px !important;
}

/* 导航计数器内联样式 */
.nav-counter-inline {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.6) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  padding: 2px 8px !important;
  border-radius: 8px !important;
  margin-left: auto !important;
  font-variant-numeric: tabular-nums !important;
}

/* 队列指示器内联样式 */
.queue-indicator-inline {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.6) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 1px 6px !important;
  border-radius: 6px !important;
  margin-left: 8px !important;
}
